package com.ruoyi.check.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.check.mapper.SequenceMapper;
import com.ruoyi.check.domain.Sequence;
import com.ruoyi.check.service.ISequenceService;

/**
 * 流水表Service业务层处理
 *
 * @author hugh.sun
 * @date 2023-04-11
 */
@Service
public class SequenceServiceImpl implements ISequenceService
{
    @Autowired
    private SequenceMapper sequenceMapper;

    /**
     * 查询流水表
     *
     * @param id 流水表主键
     * @return 流水表
     */
    @Override
    public Sequence selectSequenceById(Long id)
    {
        return sequenceMapper.selectSequenceById(id);
    }

    /**
     * 查询流水表列表
     *
     * @param sequence 流水表
     * @return 流水表
     */
    @Override
    public List<Sequence> selectSequenceList(Sequence sequence)
    {
        return sequenceMapper.selectSequenceList(sequence);
    }

    /**
     * 新增流水表
     *
     * @param sequence 流水表
     * @return 结果
     */
    @Override
    public int insertSequence(Sequence sequence)
    {
        return sequenceMapper.insertSequence(sequence);
    }

    /**
     * 修改流水表
     *
     * @param sequence 流水表
     * @return 结果
     */
    @Override
    public int updateSequence(Sequence sequence)
    {
        return sequenceMapper.updateSequence(sequence);
    }

    /**
     * 批量删除流水表
     *
     * @param ids 需要删除的流水表主键
     * @return 结果
     */
    @Override
    public int deleteSequenceByIds(Long[] ids)
    {
        return sequenceMapper.deleteSequenceByIds(ids);
    }

    /**
     * 删除流水表信息
     *
     * @param id 流水表主键
     * @return 结果
     */
    @Override
    public int deleteSequenceById(Long id)
    {
        return sequenceMapper.deleteSequenceById(id);
    }

    @Override
    public Long yixunjian() {
        return sequenceMapper.yixunjian();
    }

    @Override
    public Long xunjianduoshaoci(String name) {
        Long xunjianduoshaoci = sequenceMapper.xunjianduoshaoci(name);
        return xunjianduoshaoci;
    }
}
